package cn.iocoder.yudao.module.trade.statistics.api;

import cn.iocoder.yudao.module.api.trade.statistics.TradeStatisticsApi;
import cn.iocoder.yudao.module.api.trade.statistics.dto.TradeOrderAreaStatisticsRespDTO;
import cn.iocoder.yudao.module.trade.statistics.service.TradeOrderStatisticsService;
import cn.iocoder.yudao.module.trade.statistics.service.TradeStatisticsService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  这里是文件说明
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/01/17
 */
@Service
@Validated
public class TradeStatisticsApiImpl implements TradeStatisticsApi {
    @Resource
    private TradeStatisticsService tradeStatisticsService;
    @Resource
    private TradeOrderStatisticsService tradeOrderStatisticsService;

    @Override
    public Integer getExpensePrice(LocalDateTime beginTime, LocalDateTime endTime) {
        return tradeStatisticsService.getExpensePrice(beginTime, endTime);
    }

    @Override
    public Integer getOrderUserCount(LocalDateTime beginTime, LocalDateTime endTime) {
        return tradeOrderStatisticsService.getOrderUserCount(beginTime, endTime);
    }

    @Override
    public Integer getPayUserCount(LocalDateTime beginTime, LocalDateTime endTime) {
        return tradeOrderStatisticsService.getPayUserCount(beginTime, endTime);
    }

    @Override
    public Integer getOrderPayPrice(LocalDateTime beginTime, LocalDateTime endTime) {
        return tradeOrderStatisticsService.getOrderPayPrice(beginTime, endTime);
    }

    @Override
    public List<TradeOrderAreaStatisticsRespDTO> getSummaryListGroupByAreaId() {
        return tradeOrderStatisticsService.getSummaryListByGroupAreaId();
    }

}
